
<template>
  <div class="wrapper">
    兄弟组件传参,这是父组件
    <brotherA />
    <brotherB />
  </div>
</template>

<script setup lang="ts">
import brotherA from './BrotherA.vue'
import brotherB from './BrotherB.vue'
import { provide, ref } from 'vue';

const msg = ref('给孙组件传递的值');

function updateMsg() {
  msg.value = 'South Pole'
}

provide('provideMsg', {msg,updateMsg})
// 可以注册多个provide
provide('msg', 'testmsg')

</script>

<style scoped>

</style>
